Rory McIlroy apologised to Scottie Scheffler's family after he dramatically edged out the American to seal a stunning FedExCup victory.